<template>
    <headers></headers><br><br><br>
    <div>
  
      
  
      <div style="display: flex; margin: 15px 0;">
        <el-card style="width: 50%;">
          <div style="margin-bottom: 15px;">系统公告</div>
          <el-timeline>
            <el-timeline-item v-for="item in notice.notices" :key="item.id" :timestamp="item.time" placement="top">
            <el-card>
            <h4>{{ item.title }}</h4> 
  
            <div class="w-e-text"> 
              <div v-html="item.content" autocomplete="off"></div>
            </div>
  
            </el-card>
          </el-timeline-item>
          </el-timeline>
        </el-card>
      </div>
  
  
  
  
  
    </div>
  </template>
  
  <script setup>
  import Headers from '../components/Headers.vue';
    import request from "../utils/request";
    import {reactive,onMounted,watch} from "vue";
  
    const notice=reactive(
      {notices:[
  
    ]})
  
    const getNotices=()=>{
      request.get("user/getNotices").then(res=>{        
        if(res.code==200){
          notice.notices=res.data
          ElMessage.success("操作成功")
        }else{
          ElMessage.error(res.message)
        }
      })
    }
  
  
    onMounted(()=>{
    getNotices()
  })
  
  </script>